const allPlugins = [];
if ( process.env.NODE_ENV === "production" ) {
  allPlugins.push( "transform-remove-console" );
}

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ],

  plugins: [
    [
      "component",
      {
        libraryName: "element-ui",
        styleLibraryName: "theme-chalk"
      }
    ],
    // 插件数组
    ...allPlugins
  ],
  // 允许两种编码引入方式共存,也就是 common 规范与 es6 规范的共存处理
  sourceType: 'unambiguous'
}
